package fischl;

import fischl.douyuApi.DouyuWatcher;
import fischl.douyuApi.model.Danmu;
import fischl.huyaApi.HuyaWatcher;
import fischl.model.VideoModel;

import java.util.List;

public abstract class Platform {

  public abstract void doWatch();

  public abstract List<VideoModel> getSnapshot();

  public abstract VideoModel getVideoModelByVid(String vid);

  public abstract List<Danmu> getDanmu(String vid);

  public static Platform current() {
    return instance;
  }

  private static Platform instance;

  public static Platform init(boolean isDouyu) {
    if(isDouyu) instance = new DouyuWatcher();
    else instance = new HuyaWatcher();
    return instance;
  }
}